package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/14 14:35
 * 邮箱：648859026@qq.com
 */
public class GuideGetCommentListAction extends AHttpService<PbBean.PbResCommentGetCommentList>{
    /**
     * 个人秀评论列表
     * @param context
     * @param id 搭配指导ID
     * @param offset 上一页的最后一条评论ID,默认为0
     * @return
     */
    public static GuideGetCommentListAction newInstance(Context context, int id, int offset,PbBean.PbSignNavType navType){
        return new GuideGetCommentListAction(context,id,offset,navType);
    }
    private int id;
    private int offset;
    private PbBean.PbSignNavType navType;
    private GuideGetCommentListAction(Context context, int id, int offset,PbBean.PbSignNavType navType) {
        super(context);
        this.id = id;
        this.offset = offset;
        this.navType=navType;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqCommentGetCommentList.Builder builder = PbBean.PbReqCommentGetCommentList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setDetailId(id);
        builder.setOffset(offset);
        builder.setType(navType);
        return apiService.replyGetCommentList(builder.build());
    }
}
